package com.kemai.test

import android.os.Bundle
import com.kemai.common.adapter.ItemClickListener
import com.kemai.common.ui.BaseActivity
import com.kemai.test.event.click.ClickEventActivity
import com.kemai.test.event.dispatch.DisPatchMainActivity

class TestMainActivity : BaseActivity(), ItemClickListener {
    private val studyContent = arrayOf("事件分发打印测试","事件拦截处理")
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_common_content)
        setTiTle("Test")
        setAdapterContent(studyContent,TestMainActivity@this,TestMainActivity@this)
    }

    override fun itemClick(position: Int) {

        when(position){
            0->{
                showPage(TestMainActivity@this, ClickEventActivity::class.java)
            }
            1->{
                showPage(TestMainActivity@this, DisPatchMainActivity::class.java)
            }
        }

    }
}